<?php
namespace Module\Api;

use Model\Api;
use Sfsn\Core\Controller\Controller;
/**
 * 微信api记录
 * @author shooke
 *
 */
class WxApi extends Controller
{
    public function index()
    {
        $apiModel = new Api();
        $apiModel->validate();
        $e = $apiModel->getError();
        if ($e) {
            var_dump($e);
            exit();
        }
        $apiModel->insert();
    }
    public function test()
    {
        $apiModel = new Api();
        //         $apiModel->validate();
        //         $e = $apiModel->getError();
        //         if ($e) {
        //             var_dump($e);
        //             exit();
        //         }
        //$apiModel->insert();
        $f = $apiModel->getFields();
        $this->assign('f',$f);
        $this->display();
        foreach($f as $key=>$val){
            echo "'$key'=>'',\n";
        }
    }
    
}
